home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / win / whttpd14.zip / SUPPORT / TZ.TXT < prev    next >
Text File  |  1994-05-08  |  2KB  |  61 lines

  1. The TZ program included here came from a UK user who was 
  2. wrestling with setting the TZ variable outside the US.
  3.  
  4. -----------------
  5. Xref: netcom.com comp.infosystems.www:15490
  6. Path: netcom.com!netcomsv!decwrl!news.hal.COM!olivea!\
  7.    charnel.ecst.csuchico.edu!yeshua.marcam.com!usc!\
  8.    howland.reston.ans.net!pipex!mantis!mantis!not-for-mail
  9. From: mathew@mantis.co.uk (mathew)
  10. Newsgroups: comp.infosystems.www
  11. Subject: Re: SOLVED: Setting TZ for Win httpd 1.1a7
  12. Date: 5 May 1994 12:20:10 +0100
  13. Organization: Mantis Consultants Ltd, Cambridge, UK
  14. Lines: 246
  15. Message-ID: <2qakpa$mf8@sunforest.mantis.co.uk>
  16. References: <RobertStocks.4.000C1151@symantec.com> 
  17.   <2q8t7a$1kn@vixen.cso.uiuc.edu>
  18.   <balin.76.000F43E7@vt.edu>
  19.   <rdennyCpBJ5p.H2p@netcom.com>
  20. [...]
  21.  
  22. For the benefit of UK users, I'll point out that TZ=GMT0BST is *not*
  23. correct for the UK.  MS-DOS assumes that everyone changes time zone at
  24. the same date as the USA.
  25.  
  26. For British Summer Time, the correct setting is TZ=BST-1
  27.  
  28. For Greenwich Mean Time, the correct setting is TZ=GMT0
  29.  
  30. You have to manually change setting twice a year.  Don'cha just love
  31. MS-DOS, eh?
  32.  
  33. The following Microsoft C program will let you check that you've got
  34. the right settings:
  35.  
  36. #include <stdio.h>
  37. #include <time.h>
  38.  
  39. int _daylight;
  40. long _timezone;
  41. char *_tzname[];
  42.  
  43. main()
  44. {
  45.    time_t tnow;
  46.  
  47.    time(&tnow);
  48.    printf("    Local time is %s\n",asctime(localtime(&tnow)));
  49.    printf("Universal time is %s\n",asctime(gmtime(&tnow)));
  50.    _tzset();
  51.    printf("Daylight savings time flag = %d\n", _daylight);
  52.    printf("Time offset = %ld\n", _timezone);
  53.    printf("Time zone = %s\n", _tzname[0]);
  54. }
  55.  
  56. The binary is attached, as it's only small.
  57.  
  58.  
  59. mathew
  60.  
  61.